I am working on apache-kafka + spring and java api. Facing really annoying issue. I have used kafka topic pattern approach to listen event for multiple client.
Following is the code of kafka consumer in which topic name is coming from config file and suffix has hard code value.
${${service}.topic} value - test-env.demo.*.v1
suffix value is - .cqrs.customer
@KafkaListener(
topicPattern = "${${service}.topic}" + Constants.suffix,
groupId = "test",
id = "test")
So final topic name that will be resolved for customer abc.
test-env.demo.abc.v1.cqrs.customer
and for customer xyz will be
test-env.demo.xyz.v1.cqrs.customer
but when producer emits event on any of following topic. Consumer did not listen anything.
Could someone help me on this.
Thanks